There are two activities for extracting text from PDFs:

o It chooses the file to be read and outputs a text variable with the content of the file. The result can be saved as a text file and displayed in a message box. Other string operations can be used to modify or extract information out of the generated text.

o The activity extracts or converts only the text part of the document, and any images in the document are ignored.

Let's understand the working of the Read PDF Text activity with an example that extracts the text from a PDF file and shows the output in the Output panel of UiPath Studio.

In the below figure , a sample text is stored in the PDF file that needs to be extracted using the Read PDF Text activity.

Please note that the document used in the below-demonstrated activity is just for reference .​ For practice, follow the link: Idc-future-of-work-automation-for-good . This link will redirect you to a webpage where you will need to fill out a form to download the PDF document.

In the next figure , a sequence is shown containing the Read PDF Text and Write Line activity. Read PDF Text activity reads all characters from the specified PDF file and store them in pdfOutput string variable. The pdfOutput variable is used in the Text Property of the Read PDF Text activity. A Write Line activity is used to display the extracted text from the PDF file in the Output Panel of UiPath Studio.​

In the next figure, the extracted text will be displayed in the Output panel of UiPath Studio when the process is executed.​

An important property of these activities is Range . It specifies the range of pages that the user wants to read. The user can specify a single page (e.g., "7"), a range of pages (e.g., "7-12"), or a complex range, (e.g., "2-5, 7, 15-End" or "All"). The default value is "All". Only string variables and strings are supported.

Both these Read PDF activities are self-contained, i.e., they don't require other applications to be open, so they can run in the background.

Let's understand the working of Read PDF with OCR activity with an example that extracts the text from a PDF file using OCR and shows the output in the Output panel of UiPath Studio.

In the figure below, sample data including some text and images are stored in the PDF file that needs to be extracted using Read PDF with OCR activity.

Please note that the document used in the below-demonstrated activity is just for reference .​

In the below figure , a sequence is shown containing the Read PDF with OCR and Write Line activity. Read PDF with OCR activity reads ​all characters from the specified PDF file using OCR technology and store them in pdfOutput string variable. The pdfOutput variable is used in the Text Property of the Read PDF with OCR activity. A Write Line activity displays the extracted text from the PDF file in the Output Panel of UiPath Studio.

As mentioned earlier, an OCR engine is required for the scanning procedure. In this case, we have used Microsoft OCR. Just search for the Microsoft OCR or any other OCR in the Activities panel and drag and drop it inside the Read PDF with OCR activity.​

In the below figure, the extracted text will be displayed in the Output panel of UiPath Studio when the process is executed.​